//
//  YFPhotoActionAlertView.h
//  SquashSpark
//
//  Created by Coollang on 2017/12/27.
//  Copyright © 2017年 Coollang-YF. All rights reserved.
//

#import <UIKit/UIKit.h>



@class YFActionItem;

typedef void(^ActionDidSelectBlock)(NSIndexPath *indexpath,YFActionItem *actionItem);

@interface YFActionItem:NSObject
/** 操作名称 */
@property (nonatomic, copy)NSString *actionName;

+ (instancetype)actionItemWithName:(NSString *)actionName;

/** 点击事件 */
@property (nonatomic, strong)ActionDidSelectBlock actionDidSelectBlock;

@end

@interface YFPhotoActionAlertView : UIView

@property (nonatomic, strong) NSArray <YFActionItem *>* actionItems;

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UITableView *tableView;

+ (instancetype)photoActionAlertView;

// 选择图片弹窗的便利方法
- (void)photoActionAlertViewWithTitle:(NSString *)title cameraItem:(ActionDidSelectBlock)cameraAction libraryItem:(ActionDidSelectBlock)libraryAction;

@end
